package com.wjwh.heaven.upms.biz.modules.corp.controller;


import com.wjwh.heaven.common.core.utils.Result;
import com.wjwh.heaven.upms.api.pojo.entity.SdCorp;
import com.wjwh.heaven.upms.biz.modules.corp.service.impl.SdCorpService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 企业 前端控制器
 * </p>
 *
 * @author dm
 * @since 2021-02-26
 */
@RestController
@AllArgsConstructor
@RequestMapping("/api/corp")
public class SdCorpController {


    private final SdCorpService sdCorpService;


    /**
     * 获取用户信息
     * @param corpId
     * @return
     */
    @GetMapping(value = "/{corpId}")
    public Result<SdCorp> userInfoByUserId(@PathVariable String corpId) {
        return Result.ok().setData(sdCorpService.getById(corpId));
    }
}
